package com.matt.repository.base;

import com.matt.domain.record.CheckRecord;
import com.matt.foundation.DO.CheckRecordDO;
import com.matt.foundation.DO.ChildrenCheckRecordDO;

import java.util.Date;
import java.util.List;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/7/25
 * *******************************
 */
public interface ChildrenCheckRecordRepository {


    List<ChildrenCheckRecordDO> findByClasses(String classesId);

    List<ChildrenCheckRecordDO>  findByClassesAndCreated(String classesId,String created);

    List<ChildrenCheckRecordDO>  findByChildrenIdsAndCreated(List<String> childrenIds, Date beginDate, Date endDate);

    List<ChildrenCheckRecordDO> findByClassesIn(List<String> classesIds);

    Integer findClienteleCountByDateAndAreaId(String beginDate, String endDate, String areaId);

    Integer findTeacherCountByDateAndAreaId(String beginDate, String endDate, String areaId);

    Integer findCheckInCountByDateAndAreaId(String date, String areaId);

    Integer findCheckOutCountByDateAndAreaId(String date, String areaId);

    Integer findCheckInCountByDateAndClienteleIds(String date, List<String> clienteleIds);

    //查询指定学生合同期限内的签到时间
    Integer findCheckInCountByDateAndClienteleId(String clienteleId, String beginDate, String endDate);

    //查询指定学生合同期限内的请假次数
    Integer findLeaveCountByDateAndClienteleId(String clienteleId, String beginDate, String endDate);

    Integer getTeacherCheckInCount(String staffId, String date);

    Integer getTeacherCheckOutCount(String staffId, String date);

    Integer getAreaChildCheckInCount(String areaId, String date);

    Integer getNurseryCheckInCount(String staffId, String date);

    Integer getNurseryCheckOutCount(String staffId, String date);
    
    List<ChildrenCheckRecordDO> findByAreaId(String areaId);
    
    List<CheckRecordDO> findCheckRecordByChildrenIdAndMonth(String childrenId,String month);

    List<CheckRecord> findCheckRecordsByChildrenIdAndAreaIdAndDate(String childrenId, String areaId, String date);
}
